'''
Created on Jul 14, 2012

@author: catapult
'''

SCREEN_WIDTH = 654
SCREEN_HEIGHT = 375
FPS = 30

import pygame
import time
import button
import move
import textBox
import buttonBox
import battleScreen
import player

class GUI:
    
    def __init__(self, play, opp, masterScreen):
        self.masterScreen = masterScreen
        self.masterScreen.fill((255, 255, 255))
        self.play = play
        self.opp = opp
        self.bbox = buttonBox.ButtonBox(self.play)
        self.tbox = textBox.TextBox()
        self.tbox.addMessage(30, "")
#        self.tbox.addMessage(1, "Pidgey", "Gust")
#        self.tbox.addMessage(7, "Pidgey", "Gust")
        self.bscreen = battleScreen.BattleScreen(self.play, self.opp, self.tbox)
        self.masterScreen.blit(self.bscreen.display(), [0, 0])
        self.masterScreen.blit(self.bbox.drawAttackButtons(), [SCREEN_WIDTH - 142, 0])
        #masterScreen.blit(self.bbox.drawMenuButtons(), [SCREEN_WIDTH - 142, 0])
#        masterScreen.blit(button.AttackChoiceButton().image, [50, 50])
#        masterScreen.blit(button.PokeChoiceButton().image, [300, 300])
#        masterScreen.blit(button.ItemChoiceButton().image, [300, 50])
#        masterScreen.blit(button.FleeChoiceButton().image, [50, 300])
        pygame.display.flip()
        
    def display(self):
        self.masterScreen.fill([255, 255, 255])
        self.masterScreen.blit(self.bbox.display(), [SCREEN_WIDTH - 142, 0])
        self.masterScreen.blit(self.bscreen.display(), [0, 0])
        self.masterScreen.blit(self.tbox.getDisp(), [0, 288])
        pygame.display.flip()
        
    def setPlayer(self, play):
        self.play = play
    
    def setOpp(self, play):
        self.opp = play
        
    
